Skip to content

Conversation

@jpnurmi
Copy link
Collaborator

@jpnurmi jpnurmi commented May 20, 2025

This PR adds support for empty write-only local scopes as proposed in:

See also Hub & Scope Refactoring.

Closes #1226

@jpnurmi jpnurmi force-pushed the feat/local-scopes branch 4 times, most recently from 96a51c0 to 65217f0 Compare May 23, 2025 08:41
@jpnurmi jpnurmi changed the title WIP: Local scopes feat: Add support for capturing events with local scopes May 30, 2025
@jpnurmi jpnurmi requested a review from supervacuus May 30, 2025 13:09
@github-actions
Copy link

github-actions bot commented May 30, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 7c80f6f

@jpnurmi
Copy link
Collaborator Author

jpnurmi commented May 30, 2025

@supervacuus This is ready for a first pass. Things are looking promising for sentry-unreal:

Copy link
Collaborator

@supervacuus supervacuus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks largely good. I am primarily concerned about the ownership transfer to capture.

#include "sentry_testsupport.h"
#include "sentry_utils.h"

SENTRY_TEST(scope_contexts)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all of these ❤️

@jpnurmi jpnurmi force-pushed the feat/local-scopes branch from 0e37061 to 1f9a57d Compare June 4, 2025 10:32
@jpnurmi jpnurmi marked this pull request as ready for review June 4, 2025 10:36
@supervacuus
Copy link
Collaborator

So, the only things open are:

  • handle return value from sentry_value_append() and log in the error case
  • add logs if either breadcrumb has no timestamp

@jpnurmi
Copy link
Collaborator Author

jpnurmi commented Jun 4, 2025

Thanks! 🎉

@jpnurmi jpnurmi merged commit 54cede9 into master Jun 4, 2025
35 checks passed
@jpnurmi jpnurmi deleted the feat/local-scopes branch June 4, 2025 14:29
@vaind vaind mentioned this pull request Sep 26, 2025
coolguyzone pushed a commit to getsentry/sentry-docs that referenced this pull request Oct 20, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

## DESCRIBE YOUR PR

Adds missing documentation for local scopes introduced earlier in
sentry-native
[0.9.0](https://github.com/getsentry/sentry-native/releases/tag/0.9.0):
- getsentry/sentry-native#1248

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [x] Checked Vercel preview for correctness, including links
- [x] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local scopes

4 participants